openwrt/openwrt.git
27 min agorealtek: mdio: rename main mdio bus main master
Markus Stockhausen [Sun, 25 Jan 2026 17:19:44 +0000 (18:19 +0100)]
realtek: mdio: rename main mdio bus

Looking at the Realtek mdio busses there are curently the following

root@OpenWrt:~# mdio
1b000000.switchcore:mdio-controller-mii
fixed-0
realtek-aux-mdio
realtek-serdes-mdio
rtldsa_mdio-0

The main mdio bus for the phys is named after the dts node it belongs
to (1b000000.switchcore:mdio-controller-mii). As it is attached to the
controller node it is even more confusing.

Align the naming to the other busses and use "realtek-mdio".

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21702
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
29 min agorealtek: phy: drop internal RTL8218B firmware
Markus Stockhausen [Thu, 5 Feb 2026 18:45:22 +0000 (19:45 +0100)]
realtek: phy: drop internal RTL8218B firmware

The phy driver still uses the ancient unknown firmware file format
for the internal RTL8218B of the RTL838x. Get rid of that and
convert the initialization to the bare minimum.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21885
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
49 min agokernel: bump 6.12 to 6.12.69
John Audia [Fri, 6 Feb 2026 19:54:35 +0000 (14:54 -0500)]
kernel: bump 6.12 to 6.12.69

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.69

All patches automatically rebased.

Build system: x86/64
Build-tested: flogic/glinet_gl-mt6000
Run-tested: flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 hours agolantiq: xrx200: handle EPROBE_DEFER for MAC address
Burak Aydos [Tue, 3 Feb 2026 20:38:01 +0000 (23:38 +0300)]
lantiq: xrx200: handle EPROBE_DEFER for MAC address

The xrx200 ethernet driver falls back to a random MAC address on any
error from of_get_ethdev_address(), including -EPROBE_DEFER. When the
MAC address comes from an nvmem layout driver (such as u-boot-env on
NAND), the nvmem cell may not be available yet at first probe attempt.

Fix this by propagating EPROBE_DEFER so the driver probe is deferred
until the nvmem cell becomes available.

Tested on Zyxel P-2812HNU-F1 (NAND, u-boot-env nvmem layout).

Signed-off-by: Burak Aydos <byhexadecimal@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21861
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 hours agohostapd: add DPP ucode API for external frame handling
Felix Fietkau [Tue, 3 Feb 2026 19:13:24 +0000 (19:13 +0000)]
hostapd: add DPP ucode API for external frame handling

Add a ucode API to hostapd and wpa_supplicant for external DPP frame
handling. This allows an external controller to intercept DPP frames
and handle the DPP protocol externally.

The API provides:
- RX callbacks (dpp_rx_action, dpp_rx_gas) called when DPP frames are
  received, allowing external handling before internal processing
- TX methods (dpp_send_action, dpp_send_gas_resp/dpp_send_gas_req) for
  transmitting DPP frames
- A ubus channel-based API (dpp_channel) for bidirectional communication
  with exclusive hook registration per interface
- CCE control for hostapd (set_cce method)

The wpa_supplicant API mirrors hostapd but adapted for STA role:
- Uses tx_gas_req instead of tx_gas_resp
- GAS RX provides full frame instead of parsed query
- No CCE control (AP-only feature)

Both implementations include:
- Timeout handling with automatic channel disconnect after 3 failures
- Hook cleanup on interface removal
- Last-caller-wins semantics for hook registration

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 hours agowifi-scripts: fix nested config accumulation in wdev_set_data
Felix Fietkau [Wed, 4 Feb 2026 10:34:55 +0000 (10:34 +0000)]
wifi-scripts: fix nested config accumulation in wdev_set_data

When storing device-level data, wdev_set_data() spread the entire wdev
object into handler_data. Since handler_config.data is set from the
previous handler_data[wdev.name] before each setup, this created
exponentially growing nesting with each reload, eventually causing
"nesting too deep" JSON parse errors.

Fix by initializing cur to a simple object containing only the device
name instead of the entire wdev object.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 hours agowifi-scripts: add DPP encryption support
Felix Fietkau [Wed, 4 Feb 2026 05:46:53 +0000 (05:46 +0000)]
wifi-scripts: add DPP encryption support

Add support for DPP (Device Provisioning Protocol) as both a primary
encryption type and as an optional addition to existing authentication.

Primary DPP mode (encryption=dpp):
- Sets WPA2 with key_mgmt=DPP
- Requires Management Frame Protection (ieee80211w=2)
- Supports dpp_connector, dpp_csign, dpp_netaccesskey options

Optional DPP mode (dpp=1 boolean on AP):
- Adds DPP to existing key management methods
- Allows AP to accept both DPP and other auth types
- Supports the same connector options

Both ucode and legacy shell implementations are updated for AP and STA
modes.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 hours agocli: add cidr6 data type
John Crispin [Fri, 6 Feb 2026 06:35:24 +0000 (07:35 +0100)]
cli: add cidr6 data type

Signed-off-by: John Crispin <john@phrozen.org>
8 hours agocli: object-editor: merge named_args into create parameters
John Crispin [Fri, 6 Feb 2026 06:30:19 +0000 (07:30 +0100)]
cli: object-editor: merge named_args into create parameters

Allow callers of edit_create_destroy to pass additional named arguments
via info.named_args that get merged into the create command parameters.

Signed-off-by: John Crispin <john@phrozen.org>
8 hours agounetmsg: notify subscribers when remote peer connection drops
John Crispin [Fri, 6 Feb 2026 07:41:49 +0000 (08:41 +0100)]
unetmsg: notify subscribers when remote peer connection drops

When a remote peer's connection drops (device powered off, unetmsgd
crash, network failure), network_rx_cleanup_state silently removed
the remote publish/subscribe handles without notifying local
subscribers. This meant local clients had no way to detect that a
remote peer had disappeared.

Call handle_publish for each channel where a remote publish handle
is removed during connection cleanup, so local subscribers receive
the publisher change notification and can react accordingly.

Signed-off-by: John Crispin <john@phrozen.org>
8 hours agounetmsg: only send publish notifications for remote publisher changes
Felix Fietkau [Sat, 7 Feb 2026 08:02:24 +0000 (08:02 +0000)]
unetmsg: only send publish notifications for remote publisher changes

handle_publish() notifies local subscribers about publisher state
changes. The publish/subscribe handler in network_socket_handle_request()
was calling it for both remote publish and subscribe changes, but
subscriber changes are not relevant to local subscribers.

Guard the handle_publish() calls with a msgtype == "publish" check,
matching the local client paths in unetmsgd-client.uc which already
have this guard.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 hours agounetmsg: fix reconnect loop when RX authenticates before TX
Felix Fietkau [Fri, 6 Feb 2026 10:12:31 +0000 (10:12 +0000)]
unetmsg: fix reconnect loop when RX authenticates before TX

When both peers connect simultaneously, the RX side can authenticate
before the TX handshake completes. network_check_auth() was sending a
ping on the unauthenticated TX channel, which gets rejected by the
remote's pre-auth handler as "Auth failed", killing the connection and
triggering an endless reconnect cycle.

Check chan.auth before interacting with the TX channel. If TX auth
hasn't completed yet, just schedule a reconnect timer - auth_data_cb
already handles state sync when TX auth completes.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 hours agounetmsg: close all channels on network removal
Felix Fietkau [Fri, 6 Feb 2026 09:30:49 +0000 (09:30 +0000)]
unetmsg: close all channels on network removal

network_close() only closed the listening socket without shutting down
established RX/TX connections. This left remote state in
core.remote_publish/core.remote_subscribe for hosts on the removed
network, causing stale entries in channel listings and failed routing
attempts.

Close all RX and TX channels before removing the network, which also
triggers remote state cleanup via network_rx_socket_close().

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 hours agounetmsg: fix inverted condition in network_rx_socket_close()
Felix Fietkau [Fri, 6 Feb 2026 09:30:26 +0000 (09:30 +0000)]
unetmsg: fix inverted condition in network_rx_socket_close()

The cleanup condition checked != instead of ==, inverting the logic.
This caused two problems:

When an authenticated RX connection disconnected, remote state for that
host was never cleaned up since the stored entry matched the one being
closed.

When a stale unauthenticated connection from a peer closed, any existing
authenticated connection from the same peer was incorrectly deleted and
its remote state wiped.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 hours agounetmsg: fix publish notification timing around remote auth
Felix Fietkau [Fri, 6 Feb 2026 09:22:30 +0000 (09:22 +0000)]
unetmsg: fix publish notification timing around remote auth

When a remote peer's publish registrations arrive via RX before the
local TX connection is authenticated, handle_publish fires but the
subscriber can't reach the remote publisher yet since the TX channel
isn't ready.

Suppress publish notifications on the RX side when no authenticated TX
channel exists for the remote host. After TX authentication completes,
re-trigger handle_publish only for topics that the specific peer
publishes and that have local subscribers.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 hours agounetmsg: fix stale network cleanup in unetd_network_update()
Felix Fietkau [Fri, 6 Feb 2026 09:17:50 +0000 (09:17 +0000)]
unetmsg: fix stale network cleanup in unetd_network_update()

The condition checked !data.networks instead of !data.networks[name],
making it always false since data.networks was already validated earlier
in the function. Networks removed from unetd were never closed.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 hours agoprocd: reload_config: support UCI overlay directory
John Crispin [Fri, 23 Jan 2026 08:54:11 +0000 (09:54 +0100)]
procd: reload_config: support UCI overlay directory

Check /var/run/uci/ before /etc/config/ so that overlay configs
also trigger service reload events.

The overlay directory takes precedence, and uci show already handles
merging overlay + base configuration correctly.

Signed-off-by: John Crispin <john@phrozen.org>
8 hours agoucode: add ubus fixes
Felix Fietkau [Sat, 7 Feb 2026 07:47:36 +0000 (07:47 +0000)]
ucode: add ubus fixes

- avoid double close of externally owned channel fds
- fix refcounting bug

Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 hours agotools/expat: update to 2.7.4
Nick Hainke [Fri, 6 Feb 2026 22:00:25 +0000 (23:00 +0100)]
tools/expat: update to 2.7.4

Changelog:
https://github.com/libexpat/libexpat/blob/R_2_7_4/expat/Changes

Fixes: CVE-2026-24515 CVE-2026-25210
Link: https://github.com/openwrt/openwrt/pull/21907
Signed-off-by: Nick Hainke <vincent@systemli.org>
9 hours agojansson: update to 2.15.0
Nick Hainke [Sat, 7 Feb 2026 00:24:31 +0000 (01:24 +0100)]
jansson: update to 2.15.0

Changelog:
https://github.com/akheron/jansson/blob/v2.15.0/CHANGES

Remove upstreamed patch:
001-cmake-ver.patch

Link: https://github.com/openwrt/openwrt/pull/21908
Signed-off-by: Nick Hainke <vincent@systemli.org>
21 hours agolibtraceevent: update to 1.9.0
Nick Hainke [Thu, 5 Feb 2026 20:35:37 +0000 (21:35 +0100)]
libtraceevent: update to 1.9.0

Changelog:
13701b5 libtraceevent: 1.9
6a3a815 libtraceevent: Add tep_load_modules() API
31fc91b libtraceevent: Add tep_parse_last_boot_info()
5e4ef1f libtraceevent: Add tep_btf_list_args()
aa49dce libtraceevent: Split out btf func init code from tep_btf_print_args()
239b063 libtraceevent: Do not change names of functions not of this library
c284dec libtraceevent: Handle __get_stacktrace()
1ba1262 libtraceevent: Move back to 1.8.99
263459e libtraceevent: Use BTF_INT_BITS/OFFSET() when parsing int parameters
0294b73 libtraceevent utest: Add simple test to test BTF parsing
38e03ac libtraceevent: Have BTF find functions with extra characters
b441fff libtraceevent: Add man page for the new BTF functions
87f30d9 libtraceevent: Add loading of BTF to the tep handle
3488dc9 libtraceevent: Move to 1.9 devel

Link: https://github.com/openwrt/openwrt/pull/21886
Signed-off-by: Nick Hainke <vincent@systemli.org>
21 hours agolibtracefs: update to 1.8.3
Nick Hainke [Thu, 5 Feb 2026 20:29:35 +0000 (21:29 +0100)]
libtracefs: update to 1.8.3

Changelog:
6fad6a1 libtracefs: version 1.8.3
5505e14 libtracefs: Do not have utest fail debugfs/tracing not found
362574c libtracefs: Fix whitespace in enable_disable_all()
06c07be libtracefs: Make comm field a string
0a2a28f libtracefs/Documentation: Fix markup in the man page
57fcdc1 libtracefs: utest: Return non-zero exit code when something fails
ae03455 libtracefs: Fix tracefs_event_is_enabled() for all events
01a3fd3 libtracefs: Fix enum type in read_event_state
ef1656b libtracefs: Fix the /dev/null redirection compatibility in Makefile

Link: https://github.com/openwrt/openwrt/pull/21886
Signed-off-by: Nick Hainke <vincent@systemli.org>
24 hours agoxdp-tools: update to 1.5.8
Nick Hainke [Sat, 22 Nov 2025 06:48:25 +0000 (07:48 +0100)]
xdp-tools: update to 1.5.8

Release Notes:
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.8
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.7
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.6
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.5
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.4
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.3
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.2
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.1
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.5.0
- https://github.com/xdp-project/xdp-tools/releases/tag/v1.4.3

Remove upstreamed:
- 010-configure-respect-LDFLAGS.patch
- 020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch
- 024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch
- 025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch

Remove unnecessary patch:
- 022-xdp-dump-add-missing-perf_event-include-for-bpf-and-.patch
  (The included headers were incorrect. Some musl toolchain headers
   appeared in the BPF bytecode generation path, which should not
   happen. This issue is resolved by overriding CFLAGS and LDFLAGS.)

Remove `PKG_FLAGS:=nonshared`. With this flag enabled, the package is
compiled separately for every target. Removing it limits compilation
to each CPU architecture instead, significantly reducing unnecessary
build overhead.

Add new tools:
- xdp-bench:
  XDP-bench is a benchmarking utility for exercising the different operation modes
  of XDP. It is intended to be a simple program demonstrating the various operating
  modes; these include dropping packets, hairpin forwarding (using the XDP_TX return
  code), and redirection using the various in-kernel packet redirection facilities.
- xdp-forward:
  xdp-forward is an XDP forwarding plane, which will accelerate
  packet forwarding using XDP. To use it, simply load it on
  the set of interfaces to accelerate forwarding between.
- xdp-monitor:
  XDP-monitor is a tool that monitors various XDP related statistics and
  events using BPF tracepoints infrastructure, trying to be as low overhead
  as possible.
- xdp-trafficgen:
  XDP-trafficgen is a packet generator utilising the XDP kernel subsystem
  to generate packets transmit them through a network interface.
  Packets are dynamically generated and transmitted in the kernel,
  allowing for high performance (millions of packets per second per core).

Co-Developed-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/20903
Signed-off-by: Nick Hainke <vincent@systemli.org>
24 hours agoext-toolchain: fix wrapper for gcc-ar, gcc-nm, gcc-ranlib
Gustavo Henrique Nihei [Fri, 23 Jan 2026 21:04:59 +0000 (18:04 -0300)]
ext-toolchain: fix wrapper for gcc-ar, gcc-nm, gcc-ranlib

The pattern '*-*cc-*' incorrectly matches these tools because their names
contain 'cc-'. This causes them to receive compiler CFLAGS, breaking
builds with 'ar: two different operation options specified'.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Link: https://github.com/openwrt/openwrt/pull/21757
Signed-off-by: Robert Marko <robimarko@gmail.com>
31 hours agorealtek: pcs: rtl93xx: configure in-band AN advertisement
Jan Hoffmann [Wed, 4 Feb 2026 15:22:06 +0000 (16:22 +0100)]
realtek: pcs: rtl93xx: configure in-band AN advertisement

Enabling and disabling in-band auto-negotation is already supported on
RTL93xx. However, so far the advertisement is left unchanged at the
default of 0x1a0 (full duplex + pause + asymmetric pause).

Instead, set the advertisement to reflect the current configuration for
1000Base-X and 2500Base-X. Nothing needs to be done for SGMII, as the
advertisement register is ignored in that case.

Testing shows that negotiation of flow control works for 1000Base-X and
2500Base-X (tested with RTL930x on both ends of the link).

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/21869
Signed-off-by: Robert Marko <robimarko@gmail.com>
31 hours agorealtek: pcs: rtl93xx: implement restarting auto-negotiation
Jan Hoffmann [Wed, 4 Feb 2026 23:17:32 +0000 (00:17 +0100)]
realtek: pcs: rtl93xx: implement restarting auto-negotiation

Add a new SerDes operation for restarting in-band negotiation including
an implemenation for RTL93xx, and call it from .pcs_an_restart.

This is a prerequisite for configuration of the in-band advertisement,
as changing it requires triggering a restart of auto-negotiation.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/21869
Signed-off-by: Robert Marko <robimarko@gmail.com>
31 hours agorealtek: dsa: remove storm control
Bjørn Mork [Thu, 5 Feb 2026 13:08:51 +0000 (14:08 +0100)]
realtek: dsa: remove storm control

Commit 78bf3a5f44bf ("realtek: dsa: Fix rate control initialization") enabled
code setting up the "storm control" feature. This casued a speed regression
on rtl838x, reducing the effective max speed per port from line rate to around
500 Mbits/s.

Storm control is a policy feature with a number of input parameters depending
on use case and environment.  It is not possible to define a meaningful static
policy in the driver. The problem isn't just the arbitrary limits in the
current code.  Such features require userspace interfaces.

Drop this code for now. It wasn't missed while it was disabled.

Cc: Sven Eckelmann <se@simonwunderlich.de>
Fixes: 78bf3a5f44bf ("realtek: dsa: Fix rate control initialization")
Link: https://github.com/openwrt/openwrt/issues/21692
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/21877
Signed-off-by: Robert Marko <robimarko@gmail.com>
32 hours agoqualcommax: ipq50xx: backport v6.20 patches
George Moussalem [Thu, 5 Feb 2026 17:31:38 +0000 (21:31 +0400)]
qualcommax: ipq50xx: backport v6.20 patches

Replace the following pending patches which have now been merged in
kernel v6.20:
- arm64: dts: qcom: ipq5018: Remove tsens v1 fallback compatible
- clk: qcom: gcc-ipq5018: flag sleep clock as critical
- arm64: dts: qcom: ipq5018: Correct USB DWC3 wrapper interrupts

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21883
Signed-off-by: Robert Marko <robimarko@gmail.com>
32 hours agoqualcommbe: update pwm patches and add missing symbol
Kenneth Kasilag [Thu, 5 Feb 2026 23:48:07 +0000 (23:48 +0000)]
qualcommbe: update pwm patches and add missing symbol

Update PWM patch set to v20 which resolves some bugs related to the
duty cycle / frequency calculation; and add missing config symbol
CONFIG_PWM.

Fixes: #21727
Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/21889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agoapk: backport upstream fix for invalid fetch timestamps
Matt Merhar [Thu, 5 Feb 2026 04:45:13 +0000 (23:45 -0500)]
apk: backport upstream fix for invalid fetch timestamps

Uninitialized memory led to bogus, huge timestamps being set on files
downloaded with the wget backend. This caused odd issues like 'ls -l'
crashing busybox when attempting to list the .apk file afterwards.

Link: https://gitlab.alpinelinux.org/alpine/apk-tools/-/commit/42f159e67bafe1dad16839c0c0a005b5e89487ba
Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/21874
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agorealtek: dsa: convert trailer tag hack into separate module
Markus Stockhausen [Sun, 1 Feb 2026 10:11:51 +0000 (11:11 +0100)]
realtek: dsa: convert trailer tag hack into separate module

DSA tagging currently works with a tuned trailer tagging. That means:

- realtek target uses tag_trailer for tagging
- there is a patch for the trailer tagger to write the target port not
  as a bitfield but as an integer

Make the tagging independent from upstream and hacky patches by providing
a new downstream driver. This can be aligned easier for future development.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21815
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agorealtek: dsa: make use of device_get_match_data()
Markus Stockhausen [Wed, 4 Feb 2026 07:10:04 +0000 (08:10 +0100)]
realtek: dsa: make use of device_get_match_data()

The SoC specific configuration structure is currently manually
assigned depending on the family_id. This will be removed in
the future. Make use of device_get_match_data() instead.

While we are here rename the structure prefix.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21866
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agorealtek: dsa: rtl838x: drop redundant SMI_GLB_CTRL accesses
Bjørn Mork [Wed, 4 Feb 2026 15:02:08 +0000 (16:02 +0100)]
realtek: dsa: rtl838x: drop redundant SMI_GLB_CTRL accesses

Bit 15 of the rtl838x SMI_GLB_CTRL register is set early during mdio reset
and never cleared.  There is no need to set it again.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/21868
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agorealtek: mdio: rtl838x: re-enable phy control via SoC
Bjørn Mork [Wed, 4 Feb 2026 11:23:24 +0000 (12:23 +0100)]
realtek: mdio: rtl838x: re-enable phy control via SoC

Commit 17f12695d083 ("realtek: mdio: rtl838x: activate combo PHY media detection")
dropped setting bit 15 of the SMI_GLB_CTRL register without any explanation.  This
broke the Netgear GS108Tv3, causing phy patching to fail:

 Firmware loaded. Size 1184, magic: 83808380
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:08: patch
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:08: package not ready for patch.
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:0f: probe with driver Realtek RTL8218B (internal) failed with error -5

None of the internal phys was able to detect a link after this error.

Some rtl8380 devices, like the Zyxel GS1900-10HP A1, were not affected by the bug
because their boot loader always sets bit 15. The bug could also be worked around
on affected devices by running "rtk network on" before booting OpenWrt, setting
bit 15 as a side effect.

Cc: Markus Stockhausen <markus.stockhausen@gmx.de>
Cc: Robert Marko <robimarko@gmail.com>
Fixes: 17f12695d083 ("realtek: mdio: rtl838x: activate combo PHY media detection")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/21868
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agomediatek: filogic: increase flash speed on Netcore N60 Pro
st7105 [Sat, 31 Jan 2026 07:40:47 +0000 (10:40 +0300)]
mediatek: filogic: increase flash speed on Netcore N60 Pro

This commit increases the SPI bus frequency from 20 to 52 MHz. Reduces boot
time by 2s. Below is a performance comparison.

spi-max-frequency = <20000000>
> time dd if=/dev/mtd4 of=/dev/null bs=10M count=1
> 1+0 records in
> 1+0 records out
> real    0m 1.86s
> user    0m 0.00s
> sys     0m 0.28s

spi-max-frequency = <52000000>
> time dd if=/dev/mtd4 of=/dev/null bs=10M count=1
> 1+0 records in
> 1+0 records out
> real    0m 1.04s
> user    0m 0.00s
> sys     0m 0.27s

Signed-off-by: st7105 <st7105@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21802
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 days agorealtek: phy: drop last soc_info/family usage
Markus Stockhausen [Tue, 3 Feb 2026 13:55:42 +0000 (14:55 +0100)]
realtek: phy: drop last soc_info/family usage

The internal RTL8218B gets detected cleanly. No need for
additional checks of the bus address or the SoC type.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21857
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: pcs: rtl930x: add standalone XSGMII setup
Jonas Jelonek [Tue, 13 Jan 2026 10:57:21 +0000 (10:57 +0000)]
realtek: pcs: rtl930x: add standalone XSGMII setup

Add everything that's needed to have a standalone setup of the XSGMII
mode without having to rely on previous U-boot setup. This includes
patch sequences for the SerDes and extensions of symbol error reset and
reading.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: pcs: rtl93xx: handle XSGMII autoneg
Jonas Jelonek [Mon, 26 Jan 2026 23:20:26 +0000 (23:20 +0000)]
realtek: pcs: rtl93xx: handle XSGMII autoneg

The XSGMII mode is special in several regards. The inband
autonegotiation for this mode is called 'XSG N-way'. It is controlled
using different bits and location, and using XSG operations.

Add support for this by enhancing the set_autoneg implementation shared
by RTL930x and RTL931x. This can stay shared since it works the same for
both variants.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: pcs: make set_autoneg a SerDes operation
Jonas Jelonek [Mon, 26 Jan 2026 22:57:10 +0000 (22:57 +0000)]
realtek: pcs: make set_autoneg a SerDes operation

Instead of having all kinds of SerDes-related operations in the global
pcs config structure, there's now a SerDes ops structure which is
intended to cover and separate this.

Move the set_autoneg hook to the SerDes ops to adhere to this desired
separation. Calling the operation is further encapsulated with a small
convenience helper.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agomediatek: add Motorcomm PHY support to Cudy AP3000 v1
Anton Danilov [Thu, 29 Jan 2026 11:43:17 +0000 (14:43 +0300)]
mediatek: add Motorcomm PHY support to Cudy AP3000 v1

Newer Cudy AP3000 v1 routers feature a Motorcomm YT8821 PHY
instead of the Realtek PHY [1]. Support for the YT8821
was recently introduced for the Cudy WR3000H router [2].
On the AP3000, the changes allow the PHY to be autodetected.

[1]: https://forum.openwrt.org/t/cudy-ap3000-v1-indoor-wan-motorcomm-yt8821-support/245491
[2]: https://github.com/openwrt/openwrt/pull/21399

Signed-off-by: Anton Danilov <frimen.c@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21776
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agokernel: mtd: limit Macronix lock feature to MX25L6405D only
Shiji Yang [Wed, 28 Jan 2026 15:15:30 +0000 (23:15 +0800)]
kernel: mtd: limit Macronix lock feature to MX25L6405D only

Though most Macronix Flash support the lock feature, the generic lock
implementation is not fully compatible with the Macronix series Flash.
Enabling the lock feature globally is unsafe. These hack patches are
used to unlock the Flash of ubnt devices on the ath79 target. Rework
these patches and move it to the ath79 target to prevent the potential
risk.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21754
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agotreewide: remove of_platform.h include
Rosen Penev [Fri, 12 Dec 2025 04:35:36 +0000 (20:35 -0800)]
treewide: remove of_platform.h include

This header is deprecated and typically platform_device.h should be
used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21164
[Adapted the lantiq patches a bit]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agolantiq: ltq-adsl: remove of_platform header
Rosen Penev [Sun, 14 Dec 2025 02:12:46 +0000 (18:12 -0800)]
lantiq: ltq-adsl: remove of_platform header

It's not the proper one. No of_platform_ APIs are being used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21164
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agokernel: mtd: spinand: add support for SkyHigh S35ML-3
Rongzeng Cai [Sat, 31 Jan 2026 12:46:42 +0000 (13:46 +0100)]
kernel: mtd: spinand: add support for SkyHigh S35ML-3

This introduces support for the SkyHigh S35ML-3 series SPI NAND flash
devices by importing two key patches:
 - 430-v6.14-mtd-spinand-Introduce-a-way-to-avoid-raw-access.patch
 - 431-v6.14-mtd-spinand-Add-support-for-SkyHigh-S35ML-3-family.patch

Additionally, refresh all existing patches.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Rongzeng Cai <cairongzeng@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21808
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agokernel: Add necessary CONFIG_MTD_SPLIT config option
Linus Walleij [Tue, 3 Feb 2026 17:20:44 +0000 (18:20 +0100)]
kernel: Add necessary CONFIG_MTD_SPLIT config option

Buils break without this new config, mea culpa.

Link: https://github.com/openwrt/openwrt/pull/21855
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 days agogemini: sl93512r: override SL93512R partitions for firmware
Linus Walleij [Sun, 1 Feb 2026 09:26:59 +0000 (10:26 +0100)]
gemini: sl93512r: override SL93512R partitions for firmware

This is patch is identical in form and purpose as the IB-4220-B
patch. We switch over to a single "firmware" partition.

All reference design-based machines are now converted and we can
drop the legacy set-up code.

It turns out that the reference design also uses the flash layout
with a 3072KB kernel so augment the sysupgrade to do the right
thing also here.

Link: https://github.com/openwrt/openwrt/pull/21820
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 days agogemini: sq201: override SQ201 partitions for firmware
Linus Walleij [Sat, 31 Jan 2026 23:30:33 +0000 (00:30 +0100)]
gemini: sq201: override SQ201 partitions for firmware

This is patch is identical in form and purpose as the IB-4220-B
patch. We switch over to a single "firmware" partition.

Link: https://github.com/openwrt/openwrt/pull/21820
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 days agogemini: override IB-4220-B partitions for firmware
Linus Walleij [Mon, 26 Jan 2026 07:21:29 +0000 (08:21 +0100)]
gemini: override IB-4220-B partitions for firmware

To optimize the flash usage and to make firmware upgrades
simpler, catenate the three firmware partitions "Kern",
"Ramdisk" and "Application" into one, and use all of this
for the combined MTD-splitted kernel+rootfs.

This works fine as long as the kernel is placed in the
beginning of this firmware partition and we leave the
RedBoot partition as is, so the boot loader still can load
the kernel from the first two RedBoot partitions.

Using the RedBoot partitions "as is" can be considered
harmful, because when you flash to a RedBoot partition the
file size is used for downsizing of the partition and make
firmware upgrades fail if they are larger than the RedBoot
partition size after flashing, despite there is actually
flash there. So overriding with fixed partitions is just
generally a good idea.

Link: https://github.com/openwrt/openwrt/pull/21820
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 days agokernel: mtdsplit: create executable prolog splitter
Linus Walleij [Tue, 27 Jan 2026 17:09:10 +0000 (18:09 +0100)]
kernel: mtdsplit: create executable prolog splitter

The problem is the following: we have three fixed partitions
in a RedBoot partition for kernel, initrd and rootfs. On the
surface this looks good.

But we have little flash and want to use it efficiently. We want
to use the OpenWrt "firmware" partition scheme where the kernel,
initramfs and sqashfs+jffs2 rootfs is appended, leaving maximum
space for a writeable rootfs.

To do this we will override the existing RedBoot partition table
with one that merges the three separate partitions into one
"firmware" partition.

RedBoot is still booting the system. It still needs to read the
first two parts "as if" these were the kernel and initrd. This
works fine, because the kernel still comes first.

We already have hacks in place to merge the two kernel and initrd
into one binary image and execute it. This is done by prepending
a "prolog" to the kernel that does the necessary copying in
memory and then jumps to execute the kernel.

Since this "prolog" copying routine is just 92 bytes but has 512
bytes allocated, we can trivially create a firmware format that
can be used for splitting the image into kernel and rootfs
using a tagging scheme that can be done directly by scripting
so we don't need any special binary programs.

This splitter implements that idea.

This will be used on the Gemini platform and was tested on the
Raidsonic IB-4220-B.

Link: https://github.com/openwrt/openwrt/pull/21820
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 days agowireguard-tools: fix script errors
Paul Donald [Tue, 3 Feb 2026 05:18:01 +0000 (06:18 +0100)]
wireguard-tools: fix script errors

follow-up to 148207730a3c9f3aea807df336ca33792e9d3c0f

Schoolboy error on the peer_psk value.

Also fix an issue when joining peer IPv4 and IPv6 AllowedIPs
(${peer_a_ips/ /, } replaces only the first space, while
${peer_a_ips// /, } replaces all the spaces).

Closes: https://github.com/openwrt/openwrt/issues/21847
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21851
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agorealtek: eth: define hardware receive rings in config
Markus Stockhausen [Sun, 25 Jan 2026 20:33:02 +0000 (21:33 +0100)]
realtek: eth: define hardware receive rings in config

Do not derive the number of hardware receive rings from the SoC
family. Instead add the information to the configuration
structure. Make use of it during ethernet driver probing.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21706
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agomediatek: routerich be7200: fix usb issue
Mikhail Zhilkin [Fri, 30 Jan 2026 17:23:09 +0000 (20:23 +0300)]
mediatek: routerich be7200: fix usb issue

This commit fixes non-working USB port:
---
[    5.294036] xhci-mtk 11200000.usb: error -EPERM: Failed to get supply 'vbus'
[    5.301163] xhci-mtk 11200000.usb: error -EPERM: Failed to get regulators
[    5.307938] xhci-mtk 11200000.usb: probe with driver xhci-mtk failed with error -1
---

While testing the USB power on/off functionality during the previous
commit, I didn't sufficiently test the actual operation of the USB
devices.

Fixes: ff5e66a9208a ("mediatek: add support for Routerich BE7200")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21795
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 days agorealtek: eth: rtl931x: reduce logging of special packet trap
Jonas Jelonek [Mon, 2 Feb 2026 19:31:11 +0000 (19:31 +0000)]
realtek: eth: rtl931x: reduce logging of special packet trap

For packets trapped to the CPU for a special reason (not normal
forward), the RTL931x tag decoding always print a log message with level
INFO. This is not needed and just spams the log, e.g. when LLDP packets
are running through the network, each of them causes a log message.

Make that a debug message instead of an info message. We can keep it,
just change when it's printed.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21844
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agohostapd: add status ubus method
Felix Fietkau [Mon, 2 Feb 2026 17:15:41 +0000 (17:15 +0000)]
hostapd: add status ubus method

Add a status method to both hostapd and wpa_supplicant ubus objects
that lists all configured interfaces with their wiphy, MAC address,
and running/pending state. For MLO interfaces, links are grouped
under a single entry with per-link status.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 days agorealtek: drop legacy I/O functions
Markus Stockhausen [Sun, 1 Feb 2026 18:35:45 +0000 (19:35 +0100)]
realtek: drop legacy I/O functions

Remove the unneeded sw_xxx() macros.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agorealtek: mdio: convert RTL93xx reset to regmap
Markus Stockhausen [Sun, 1 Feb 2026 18:34:29 +0000 (19:34 +0100)]
realtek: mdio: convert RTL93xx reset to regmap

Make use of regmap in the RTL93xx reset functions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agorealtek: mdio: convert RTL83xx reset to regmap
Markus Stockhausen [Sun, 1 Feb 2026 18:21:29 +0000 (19:21 +0100)]
realtek: mdio: convert RTL83xx reset to regmap

Make use of regmap in RTL83xx reset functions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agorealtek: mdio: convert debug output to regmap
Markus Stockhausen [Sun, 1 Feb 2026 18:16:07 +0000 (19:16 +0100)]
realtek: mdio: convert debug output to regmap

Some straight forward conversion ...

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agorealtek: mdio: convert RTL931x I/O to regmap
Markus Stockhausen [Sun, 1 Feb 2026 18:11:05 +0000 (19:11 +0100)]
realtek: mdio: convert RTL931x I/O to regmap

Drop legacy sw_xxx() macros for RTL931x devices. While we are here
reorganize the access and avoid masked access where possible. So the
code is easier to read.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agorealtek: mdio: convert RTL930x I/O to regmap
Markus Stockhausen [Sun, 1 Feb 2026 17:42:13 +0000 (18:42 +0100)]
realtek: mdio: convert RTL930x I/O to regmap

Drop legacy sw_xxx() macros for RTL930x devices. While we are here
reorganize the access and avoid masked access where possible. So the
code is easier to read.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agorealtek: mdio: convert RTL839x I/O to regmap
Markus Stockhausen [Sun, 1 Feb 2026 17:17:35 +0000 (18:17 +0100)]
realtek: mdio: convert RTL839x I/O to regmap

Drop legacy sw_xxx() macros for RTL839x devices. While we are here
reorganize the access and avoid masked access where possible. So the
code is easier to read.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agowireguard-tools: enable reload without teardown
Paul Donald [Sat, 31 Jan 2026 14:52:21 +0000 (15:52 +0100)]
wireguard-tools: enable reload without teardown

- preserve (active) interface (at reload)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agowireguard-tools: avoid temp file for peer generation
Paul Donald [Sat, 31 Jan 2026 15:01:44 +0000 (16:01 +0100)]
wireguard-tools: avoid temp file for peer generation

- no longer write any temporary file for peer gen
- use wg syncconf to update active interfaces (not setconf)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agowireguard-tools: avoid temp file for key gen
Paul Donald [Sat, 31 Jan 2026 14:47:30 +0000 (15:47 +0100)]
wireguard-tools: avoid temp file for key gen

- no longer write any temporary file for key gen

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agowireguard-tools: add protocol renew handler
Paul Donald [Sat, 31 Jan 2026 14:56:28 +0000 (15:56 +0100)]
wireguard-tools: add protocol renew handler

- add a renew handler
- add a peer detect handler

( benefits from https://github.com/openwrt/netifd/pull/66 )

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agowireguard-tools: detect address changes at reload
Paul Donald [Sat, 31 Jan 2026 14:53:41 +0000 (15:53 +0100)]
wireguard-tools: detect address changes at reload

Proto handler now also detects changes to
- addresses

Tighten also assign address portion

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agomac80211: ath11k: fix for unsupported 11ax EDCA
Paweł Owoc [Fri, 16 Jan 2026 10:10:35 +0000 (11:10 +0100)]
mac80211: ath11k: fix for unsupported 11ax EDCA

Currently publicly available firmware for ath11k does not support
the 11ax EDCA parameter.
Skipping sending this parameter allows the use of STA mode.

Fixes: https://github.com/openwrt/openwrt/issues/20702
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21563
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agowifi-scripts: wireless.uc: add MLO support for procd service data
Felix Fietkau [Fri, 30 Jan 2026 18:02:35 +0000 (18:02 +0000)]
wifi-scripts: wireless.uc: add MLO support for procd service data

This allows services to dynamically configure MLO interfaces without
using UCI.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 days agonetifd: ensure netifd_loglevel default value as fallback
Hannu Nyman [Sun, 1 Feb 2026 16:28:57 +0000 (18:28 +0200)]
netifd: ensure netifd_loglevel default value as fallback

Commit 168d5af added the possibility to configure netifd logging level.
The option is read from /etc/config/network and validated.
Supposedly the validation sets 2 as default.

But in case of a syntax error in /etc/config/network, the validation
result can be empty. Then the always passed option to netifd is
just '-l' instead of '-l 2'. That crashes netifd and prevents network
from launching.

Add a fallback value to the variable, so that there will always be
a proper value after the '-l' option.

Improves: 168d5af "netifd: add loglevel config option (fixes #18001)"
Fixes: #21816
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/21819
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agohostapd: fix dealing with required interface restart in AP+STA mode
Felix Fietkau [Sun, 1 Feb 2026 19:17:27 +0000 (19:17 +0000)]
hostapd: fix dealing with required interface restart in AP+STA mode

Ensure that the BSS start_disabled option is always cleared, so that
interfaces come up properly.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 days agomac80211: fix AP+STA on DFS channels
Felix Fietkau [Sun, 1 Feb 2026 18:31:36 +0000 (18:31 +0000)]
mac80211: fix AP+STA on DFS channels

Allow skipping CAC on AP bringup if the STA is connected already.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 days agomac80211: improve patch to allow grace period for DFS
Felix Fietkau [Sun, 1 Feb 2026 15:38:53 +0000 (15:38 +0000)]
mac80211: improve patch to allow grace period for DFS

Fix corner cases in updates.
Improve channel puncturing handling.
Fix dealing with CSA.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 days agoramips: add support for D-Link DIR-1360 A1
Aryaman Srivastava [Thu, 15 Jan 2026 17:43:47 +0000 (23:13 +0530)]
ramips: add support for D-Link DIR-1360 A1

The D-Link DIR-1360 A1 is an AC1300 router based on the MT7621AT SoC.

Specifications :-

* SoC: MediaTek MT7621AT
* RAM: 256 MB DDR3
* Flash: 128 MB SPI NAND (Winbond W29N01HV)
* WiFi: MT7615D (2.4 GHz + 5 GHz DBDC)
* Ethernet: 5x 10/100/1000 Mbps (1x WAN, 4x LAN)
* USB: 1x USB 3.0
* Buttons: Reset, WPS
* LEDs: Power (White/Orange), Internet (White/Orange), USB, 2.4G/5G WLAN

MAC addresses are retrieved from the 'factory' partition via NVMEM.
LAN: 0xe000 (gmac0)
WAN: 0xe006 (gmac1)
WLAN: 0xe00c (pcie0)

Flash Instruction :-

1-Set a static IP on your PC (e.g., 192.168.0.10, Gateway 192.168.0.1).
2- Power off the router and connect your PC to a LAN port.
3- Hold the Reset button and power on the router; continue holding for 5 seconds.
4- Access the Recovery UI at http://192.168.0.1 in your browser.
5- Upload the OpenWrt factory.bin image and wait for the reboot.

With these definitions in place, the DIR-1360 A1 boots reliably, exposes all hardware features correctly, and can be flashed via both the OEM recovery interface and standard OpenWrt upgrade paths.

Signed-off-by: Aryaman Srivastava <aryamansrivastava895@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21616
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agokernel: bump 6.12 to 6.12.68
John Audia [Fri, 30 Jan 2026 20:37:22 +0000 (15:37 -0500)]
kernel: bump 6.12 to 6.12.68

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.68

All patches automatically rebased.

Build system: x86/64
Build-tested: flogic/glinet_gl-mt6000
Run-tested: flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21797
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agokernel: mtk_eth_soc: fix memory leak in downstream patch
Daniel Golle [Fri, 30 Jan 2026 14:31:36 +0000 (14:31 +0000)]
kernel: mtk_eth_soc: fix memory leak in downstream patch

Bc-bocun Chen of MediaTek has discovered a memory leak in the error path
in our downstream patch for mtk_eth_soc which adds support for the 10G
PCS and PHY paths of the MT7988 SoC.
Fix this by freeing the at this point already allocated netdev resources
before returning the error.

Fixes: 4cb6bd9a6d ("mediatek: switch to pending XFI 10G Ethernet drivers")
Reported-by: Bc-bocun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 days agorealtek: replace additional "magic numbers" with macros
Linus Lüssing [Wed, 7 May 2025 16:40:40 +0000 (18:40 +0200)]
realtek: replace additional "magic numbers" with macros

Increase readability by replacing more numbers and bit operations
with macros in order to give them distinct, expressive names.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Link: https://github.com/openwrt/openwrt/pull/21786
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: change function prefixes from rtl83xx_ to rtldsa_
Linus Lüssing [Thu, 15 May 2025 00:51:14 +0000 (02:51 +0200)]
realtek: change function prefixes from rtl83xx_ to rtldsa_

So far the function prefix rtl83xx_ is used for functions which are
exclusive to RTL8390_FAMILY_ID but also for ones shared between
RTL8390_FAMILY_ID/RTL9300_FAMILY_ID/RTL9310_FAMILY_ID.

For a more fitting, precise use of rtl83xx_ rename the ones in dsa.c
which are also used by RTL9300_FAMILY_ID and RTL9310_FAMILY_ID
to rtldsa_.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Link: https://github.com/openwrt/openwrt/pull/21786
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: rtl931x: fix IPv4 unknown-mc portmask debug output
Linus Lüssing [Fri, 30 Jan 2026 21:49:12 +0000 (22:49 +0100)]
realtek: rtl931x: fix IPv4 unknown-mc portmask debug output

For the IPv4 unknown multicast flood portmask the first byte should be
for the higher port numbers and the following byte for the lower port
numbers, just like for the L2 unknown multicast flood portmask or the
IPv6 unknown multicast flood portmasks, too. Not the other way around.

Fix the debug output here by adjusting the offsets accordingly.

Fixes: 27029277f98d ("realtek: add switch driver support for the RTL93XX based switches")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Link: https://github.com/openwrt/openwrt/pull/21786
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: pcs: avoid unneeded SerDes reconfiguration
Jonas Jelonek [Sun, 25 Jan 2026 23:28:14 +0000 (23:28 +0000)]
realtek: pcs: avoid unneeded SerDes reconfiguration

Avoid to reconfigure a SerDes when it has been configured for a mode
before. This usually applies to switches which drive multiple ports on a
single SerDes. For those, the phylink subsystem triggers PCS
configuration everytime although it's a single SerDes. For example, on
switches with XSGMII-connected RTL8218D the particular SerDes is
configured eight times but only a single run is needed.

Add a proper check to pcs_config which checks the mode stored in the
SerDes instance against the requested mode. Other 'settings' should be
executed though, e.g. setting autoneg. While at it, drop the check if
there is a 'setup_serdes' implementation. It's just a driver-internal
interface and all variants implement this now.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21763
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: pcs: move mode mapping to generic pcs_config
Jonas Jelonek [Sun, 25 Jan 2026 23:10:39 +0000 (23:10 +0000)]
realtek: pcs: move mode mapping to generic pcs_config

All variant-specific setup_serdes functions currently make equal use of
the mapping from the interface mode to the hardware mode. To reduce
redundancy, move this mapping to the generic pcs_config, from where the
setup_serdes implementations are called.

This includes slightly changing the setup_serdes signature and some
debug messages.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21763
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: rtl838x_eth: Use printk MAC specifier instead of raw hex
Bevan Weiss [Mon, 19 Jan 2026 08:05:31 +0000 (19:05 +1100)]
realtek: rtl838x_eth: Use printk MAC specifier instead of raw hex

The linux kernel printk has a MAC address specifier `%pM` that can be
used to pretty-print MAC addresses.  We should use this specifier when
printing MAC addresses for humans since that ensure the appearance that
people are used to.

Fixes #21796

Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21812
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: eth: fix features
Markus Stockhausen [Fri, 30 Jan 2026 13:05:59 +0000 (14:05 +0100)]
realtek: eth: fix features

"features" describes the currently active device options and
"hw_features" describes all possible ones. So hw_features must
be a superset of features. Fix that.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21778
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: eth: cleanup after transmit function switch
Markus Stockhausen [Fri, 30 Jan 2026 13:00:49 +0000 (14:00 +0100)]
realtek: eth: cleanup after transmit function switch

Remove all old structures and defines that are no longer needed.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21778
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: eth: refactor transmit function
Markus Stockhausen [Fri, 30 Jan 2026 12:58:05 +0000 (13:58 +0100)]
realtek: eth: refactor transmit function

Provide a new transmit function. It is cleaner and closer to
upstream than what we have now. The basic features are:

- Avoid memory moving and keep data in the SKBs
- Only protect really critcal parts by a lock as transmit
  queues will be only called once by the kernel

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21778
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: eth: drop pick queue functions
Markus Stockhausen [Fri, 30 Jan 2026 12:49:39 +0000 (13:49 +0100)]
realtek: eth: drop pick queue functions

The operating system has enough features to control the transmit
queues. There is no need to provide a hard coded distribution
function. Especially differentiating between a round robin for
RTL83xx and high/low priority for RTL93xx makes no sense. All
devices have the same low/high priority queues.

Simply present two "generic" queues to the kernel.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21778
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: eth: add new transmit structures
Markus Stockhausen [Wed, 28 Jan 2026 17:51:31 +0000 (18:51 +0100)]
realtek: eth: add new transmit structures

The ethernet driver will get a new transmit function. As a first
step add the required structures and initialize them.

To get an idea: In the future the transmit buffer will hold only
the needed packet header information. The real data is kept in the
SKBs. So only pointers will be changed and memory moving can be
avoided. The SoC will transfer packet data directly from the SKBs.

Additionally a new transmit lock will be established that is
separated from the current driver lock. This is only needed
to guard the "kick-the-engine" command. So contention of the old
global lock can be reduced.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21778
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: eth: disable tx interrupts
Markus Stockhausen [Wed, 28 Jan 2026 16:30:19 +0000 (17:30 +0100)]
realtek: eth: disable tx interrupts

Ethernet transmit handling processes data synchronously via a
packet buffer. As soon as it kicks the SoC to send the packet
no more post processing is needed. Especially there is no need
for transmit completion interrupts. Disable them to reduce the
CPU load.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21778
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agobuild: use STAGING_DIR for special APK package versions
Jonas Gorski [Wed, 14 Jan 2026 19:19:30 +0000 (20:19 +0100)]
build: use STAGING_DIR for special APK package versions

Removing tmp/ after having built base-files or toolchain currently
breaks rootfs generation:

$ rm -rf tmp
$ make V=w
...
 make[2] package/install
cat: .../openwrt/tmp/base-files.version: No such file or directory
cat: .../openwrt/openwrt/tmp/libc.version: No such file or directory
ERROR: 'base-files=' is not a valid world dependency, format is name(@tag)([<>~=]version)
make[2]: *** [package/Makefile:100: package/install] Error 99

The only way to recover from here is to clean toolchain and base-files via

$ make package/{base-files,toolchain}/clean

tmp is supposed to be ephemeral, so clearing it is an expected action,
which normally just triggers a regeneration of all files there.

Fix this by moving the version files to $(STAGING_DIR).

Fixes: 63e178f067 ("build: lock versions for special APK packages")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21803
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agokernel: mtd: backport upstream physmap OF partition order
Linus Walleij [Thu, 29 Jan 2026 23:24:31 +0000 (00:24 +0100)]
kernel: mtd: backport upstream physmap OF partition order

This patch was applied upstream and makes it possible to override
RedBoot partitions with fixed-partitions for platforms using
physmap.

Link: https://lore.kernel.org/linux-mtd/176971394786.256159.18224773453751051734.b4-ty@bootlin.com/
Link: https://github.com/openwrt/openwrt/pull/21788
Signed-off-by: Linus Walleij <linusw@kernel.org>
7 days agowifi-scripts: fix ieee80211w override for psk-sae/sae-mixed
Felix Fietkau [Sat, 31 Jan 2026 16:56:53 +0000 (16:56 +0000)]
wifi-scripts: fix ieee80211w override for psk-sae/sae-mixed

The ucode wifi-scripts unconditionally set ieee80211w=1 for psk-sae
and eap-eap2 auth types, ignoring any user-configured value. This
caused ieee80211w=2 (MFP required) to be silently downgraded to 1
(MFP optional) when using sae-mixed encryption.

Change the logic to only set the default of 1 when ieee80211w is not
already configured by the user.

Fixes: https://github.com/openwrt/openwrt/issues/21751
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agouclient: update to Git HEAD (2026-01-31)
Felix Fietkau [Sat, 31 Jan 2026 14:03:05 +0000 (14:03 +0000)]
uclient: update to Git HEAD (2026-01-31)

b3ee1209a3d0 uclient-http: reset fd to -1 after close in disconnect
9c2ad269c42b uclient-http: fix seq field check to use correct field
80c9bd29c233 uclient-http: fix hang on HTTP to HTTPS redirect
931bbfeb2c92 ucode: fix memory leak when using ssl context

Fixes: https://github.com/openwrt/uclient/issues/11
Fixes: https://github.com/openwrt/uclient/issues/13
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agolantiq: xrx200: add env-size for P-2812HNU-F1 u-boot-env
Burak Aydos [Thu, 29 Jan 2026 19:25:04 +0000 (22:25 +0300)]
lantiq: xrx200: add env-size for P-2812HNU-F1 u-boot-env

The u-boot-env partition on the Zyxel P-2812HNU-F1 is 128 KiB but
the actual environment data is only 8 KiB (0x2000 bytes). Without
the env-size property, the u-boot,env nvmem layout driver assumes
env-size equals the full partition size and computes an incorrect
CRC32 over the entire 128 KiB, causing all nvmem cell reads to fail
silently.

Add env-size = <0x2000> so the CRC32 is computed over the correct
8 KiB region, allowing nvmem-cells (such as ethaddr) to be read
properly by the kernel.

Signed-off-by: Burak Aydos <byhexadecimal@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21780
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agorealtek: mdio: convert rtl838x i/o to regmap
Markus Stockhausen [Tue, 27 Jan 2026 13:32:50 +0000 (14:32 +0100)]
realtek: mdio: convert rtl838x i/o to regmap

Drop legacy sw_xxx() macros for rtl838x devices. While we are here
reorganize the access and aovid masked access where possible. So the
code is easier to read.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21741
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agorealtek: mdio switch run command to regmap
Markus Stockhausen [Tue, 27 Jan 2026 12:48:04 +0000 (13:48 +0100)]
realtek: mdio switch run command to regmap

As a first step convert the central run command over to regmap.

Additional info: The command masks where changed because
sw_xxx() dont care about the to be set or to be cleared bits
(aka mask). In regmap the mask must always be a superset of the
to be set bits.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21741
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agorealtek: mdio: adapt command function signature
Markus Stockhausen [Tue, 27 Jan 2026 09:53:43 +0000 (10:53 +0100)]
realtek: mdio: adapt command function signature

To make use of regmap in the command function adapt its signature
so it has access to the control structure via the bus.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21741
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agorealtek: mdio: enhance read/write function signature
Markus Stockhausen [Tue, 27 Jan 2026 07:44:50 +0000 (08:44 +0100)]
realtek: mdio: enhance read/write function signature

For regmap conversion the read/write functions need access to the
control structure (aka bus->priv). Add the bus to the parameters list.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21741
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agorealtek: mdio: add regmap to bus structure
Markus Stockhausen [Tue, 27 Jan 2026 07:33:34 +0000 (08:33 +0100)]
realtek: mdio: add regmap to bus structure

To convert the existing sw_xxx() commands the bus needs a regmap.
This is derived from the parent mfd node like in all other Realtek
drivers.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21741
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agorealtek: dts: add LGS328C port 21 definition
Markus Stockhausen [Fri, 30 Jan 2026 17:16:02 +0000 (18:16 +0100)]
realtek: dts: add LGS328C port 21 definition

Port 21 definition was missed during addition of LGS328C.
Add it to the dts.

Fixes: 853d73f ("realtek: add support for Linksys LGS328C")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21793
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agouboot-mvebu: update to version 2026.01
Stefan Kalscheuer [Fri, 23 Jan 2026 18:13:25 +0000 (19:13 +0100)]
uboot-mvebu: update to version 2026.01

Update package to the latest stable version.
Patches unchanged.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/21673
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 days agomediatek: add support for netis NX62
Alexey Lotosh [Sat, 17 Jan 2026 16:01:06 +0000 (19:01 +0300)]
mediatek: add support for netis NX62

Same hardware as Netcore N60 Pro
Add:
DEVICE_ALT0_VENDOR := netis
DEVICE_ALT0_MODEL := NX62
DEVICE_ALT0_VARIANT := V1

Signed-off-by: Alexey Lotosh <lotosh@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21581
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>